/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Controller;

public class Connection {

    private String name;
    private String host;
    private String user;
    private String pass;

    /**
     * @return the nombre
     */
    public Connection(String name, String host, String user, String pass) {
        setName(name);
        setHost(host);
        setUser(user);
        setPass(pass);
    }
    
    public Connection(){};

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public String getPass() {
        return pass;
    }

    public void setPass(String pass) {
        this.pass = pass;
    }

    public void print() {
        if (!this.isDeleted()) {
            System.out.println(getName() + " " + getHost()  + " " +  getPass()  + " " + getUser());
        }
    }

    public boolean isDeleted() {
        boolean result = false;
        if (getName().equals("*")) {
            result = true;
        }
        return result;
    }
}
